const appid = 'wx1cd57328fcb86010'
export default function useAuthori() {
	const getWechatCode = () => {
		const local = encodeURIComponent(
			`https://zys.elecul.com/h5/#/pages/authori/authori`
		);
		window.location.href =
			"https://open.weixin.qq.com/connect/oauth2/authorize?appid=" +
			appid +
			"&redirect_uri=" +
			local +
			"&response_type=code&scope=snsapi_userinfo&connect_redirect=1#wechat_redirect";
	}

	return { getWechatCode }
}